Repository navigation
Show a column with failed data as error in the data table - #2011
Draft
AStaroverov wants to merge 1 commit into
Draft
AStaroverov wants to merge 1 commit into
AStaroverov wants to merge 1 commit into
Conversation
The leaf data read tells a .data field that holds an error from one that has no value yet. DataColumn gives no data for it, and the probe the table runs over its visible columns reports it, so the column gets the error status and the table output no longer throws. No new read is made: the error comes from the read of the field the probe already does.
🦋 Changeset detectedLatest commit: 5a42b6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2011 +/- ##
==========================================
+ Coverage 61.03% 61.14% +0.11%
==========================================
Files 444 444
Lines 24135 24163 +28
Branches 5692 5703 +11
==========================================
+ Hits 14730 14775 +45
+ Misses 7734 7711 -23
- Partials 1671 1677 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A table built with
createPlDataTableV3reads the.datafield of its visible columns to give each a status. That read usedignoreError, so a column whose data failed was handled wrong either way:.datafielderrorreadyerrorThe UI already renders the
errorstatus; nothing produced it.Change
data_column.ts) tells a field that holds an error from one that has no value yet.getData()givesundefinedfor it and no longer throws;DataColumnImpl.hasDataError()reports it.getColumnDataState(recipe)returnsready,pendingorerrored.hasColumnDatais nowgetColumnDataState(...) === "ready".buildDataStatusMapmapserroredto theerrorstatus.No new reads
Reading a
.datafield subscribes the output to it, so the error is taken only from the read that was already made:getDataStatus()is unchanged: it looks at the field list only and does not read the field.ColumnFieldStatusandColumnResolutionStatuskeep their values.hasColumnDatadid.Compatibility
A block picks this up when it is rebuilt with this SDK. It works on any desktop: no new host method is used. The empty column in the frame itself comes from #2010; on a desktop without it, the frame still fails for such a column as it does today.
Not covered
Tests
data_column.test.ts: data of a leaf for a field with a value, without a value, with an error, with an error and a value; a materialised column.columns/utils.test.ts:getColumnDataStatefor each field state, a failed leaf after a ready one, and the stop at the first leaf that is not ready.createPlDataTable/utils.test.ts:buildDataStatusMapover ready, no bytes, unset, resolving, absent and both failed states. Fails onmainwith the thrown field error.traversefollows the tree's rule for a field error (thrown unless ignored and the field has a value).